<?php
defined('IN_ADMIN') or exit('No permission resources.');
include $this->admin_tpl('header','Admin');
?>
<div class="pad-10">
<form name="search" action="<?php echo U('dialog'); ?>" method="post" >
<input type="hidden" value="<?php echo MODULE_NAME; ?>" name="m">
<input type="hidden" value="<?php echo CONTROLLER_NAME ?>" name="c">
<input type="hidden" value="<?php echo ACTION_NAME ?>" name="a">
<input type="hidden" value="<?php echo $modelid;?>" name="modelid">
<table width="100%" cellspacing="0" class="search-form">
   <tbody>
		<tr>
		<td align="center">
		<div class="explain-col">
				<select name="field">
					<option value='1' <?php if($_GET['field']=='title') echo 'selected';?>>平台名称</option>
					<option value='2' <?php if($_GET['field']=='id') echo 'selected';?>>平台ID</option>
				</select>		
				<input name="keywords" type="text" value="<?php echo stripslashes($_GET['keywords'])?>" style="width:330px;" class="input-text" />
				<input type="submit" name="search" class="button" value="<?php echo L('search');?>" />
		</div>
		</td>
		</tr>
    </tbody>
</table>
</form>
<div class="table-list">
<table width="100%" cellspacing="0">
	<thead>
		<tr>
			<th align="left">平台ID</th>
			<th align="left">平台标识</th>
			<th align="left">平台名称</th>
			<th align="left">平台官网</th>
			<th align="left">更新时间</th>
		</tr>
	</thead>
<tbody>
<?php
	if(is_array($infos)){
	foreach($infos as $k=>$v) {
?>
    <tr onclick="select_list(this, '<?php echo $v['name'] ?>', '<?php echo $v['id'] ?>');" class="item">
		<td align="left"><?php echo $v['id'] ?></td>
		<td align="left"><?php echo $v['identifier'] ?></td>
		<td align="left"><?php echo $v['name'] ?></td>
		<td align="left"><?php echo $v['url'] ?></td>
		<td align="left"><?php echo dgmdate($v['dateline'])?></td>
    </tr>
<?php
	}
}
?>
</tbody>
</table>
   <div id="pages"><?php echo $pages;?></div>
</div>
</div>
<style type="text/css">
 .line_ff9966,.line_ff9966:hover td{
	background-color:#FF9966;
}
 .line_fbffe4,.line_fbffe4:hover td {
	background-color:#fbffe4;
}
</style>
<SCRIPT LANGUAGE="JavaScript">
<!--
var result_id = "<?php echo I('obj', 'platform_id') ?>";
function select_list(obj,title,id) {
	$(".item").removeClass('line_ff9966');
	$(obj).addClass("line_ff9966");
	window.parent.$('#' + result_id + '_name').attr('value', title);
	window.parent.$('#' + result_id + '_id').attr("value", id);	
}
//-->
</SCRIPT>
</body>
</html>